import request from "@/utils/request";

// 查询安消设备列表
export function listSafeDevice(query) {
  return request({
    url: "/business/safeDevice/list",
    method: "get",
    params: query,
  });
}

// 查询设备详细
export function getSafeDevice(SafeDeviceId) {
  return request({
    url: "business/safeDevice/" + SafeDeviceId,
    method: "get",
  });
}

// 新增设备
export function addSafeDevice(data) {
  return request({
    url: "business/safeDevice",
    method: "post",
    data: data,
  });
}

// 修改设备
export function updateSafeDevice(data) {
  return request({
    url: "business/safeDevice",
    method: "put",
    data: data,
  });
}

// 删除安消设备
export function delSafeDevice(SafeDeviceId) {
  return request({
    url: "business/safeDevice",
    method: "delete",
    data: SafeDeviceId,
  });
}

// 统计安消设备类型下各种安消设备的数量
export function getStatSafeDeviceNumByType(query) {
  return request({
    url: "business/safeDevice/statSafeDeviceNumByType",
    method: "get",
    params: query,
  });
}
